<?php
class header {
    function index()
    {   
        
        $this->CI =&get_instance();
        //$this->CI->output->enable_profiler(TRUE);
        $controlador= strtolower($this->CI->router->class);
        $metodo=strtolower($this->CI->router->method);
        $data=array();
        $datos=explode("_",$metodo); 
        if ($metodo=="index" or (isset($datos[0]) && $datos[0]=="index" )){
            if ($this->CI->session->userdata('login')){
                $this->CI->load->model('mod_login');
                $data['menu']=$this->CI->mod_login->carga_menu($this->CI->session->userdata('id_tipo_usuario'));
                $data['empresas']=$this->CI->mod_login->carga_empresas();
            }
            $this->CI->load->view('view_header',$data);
       }
    }
}
?>
